var http = require("http")
var url = require("url")
var fs = require("fs")
var app = http.createServer(function (req,res) {
    // res.write("hellp world!!")
    // res.end()
    var url_obj = url.parse(req.url)
    if (url_obj.pathname === '/'){
        fs.readFile("./template/ ",'utf-8',function (err,data) {
            if (!err){
                res.write(data)
                res.end()
            }
        })

    }
})

app.listen(5000,function (err) {
    if (!err){
        console.log("listening on 5000...")
    }

})